<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>后台首页</title>
		{load href="/static/css/index.css" /}
		<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_7jm08ftxpw4s4i.css"/>
	</head>
	<body>
		<div class="leftarea">
			<div id="logo">
				<img src="/static/img/lg.png"/>
			</div>
			<div id="menu">
				<div class="parent active" data-href="statistics.html">
					<span class="label"><i class="iconfont icon-tongji-copy"></i></span><span>营业统计</span>
				</div>
				<div class="parent">
					<span class="label"><i class="iconfont icon-yue1"></i></span><span>收银账单</span>
				</div>
				
				<div class="childdiv">
					<div class="child" data-href="{:url('Index/orderlist')}">
						<span class="label"></span><span>POS交易记录</span>
					</div>
					<div class="child">
						<span class="label"></span><span>交易数据统计</span>
					</div>
					<div class="child">
						<span class="label"></span><span>应用购买记录</span>
					</div>
				</div>

				<div class="parent" data-href="{:url('Index/allapp')}">
					<span class="label"><i class="iconfont icon-yingyong"></i></span><span>应用市场</span>
				</div>
				<div class="parent" data-href="{:url('Index/myapp')}">
					<span class="label"><i class="iconfont icon-yingyong1"></i></span><span>我的应用</span>
				</div>
				<div class="parent">
					<span class="label"><i class="iconfont icon-shezhi"></i></span><span>系统设置</span>
				</div>
			</div>
		</div>
		<!--右侧正文-->
		<iframe src="statistics.html" frameborder="no" id="rightarea"></iframe>
		<!--脚本开始-->
		<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
		<script type="text/javascript">
			/**
			 * 菜单切换
			 */
			jQuery("#menu").on("click",".parent,.child",function(){
				var _this=$(this);
				_this.addClass("active").siblings().removeClass("active");
				if(_this.hasClass("parent")){
					_this.siblings(".parent").each(function(){
						$(this).next(".childdiv").hide("normal").find(".active").removeClass("active");
					})
					_this.next(".childdiv").show("normal");
				}
				if(_this.attr("data-href")){
					document.getElementById("rightarea").src=_this.attr("data-href");
				}else{
					console.log("无URL");
				}
			})
		</script>
	</body>
</html>
